<?php
namespace App\Http\Controllers\MobileWeb;

use App\Http\Controllers\WebController;
use App\Http\Controllers\Business\App\OrderManagement\OrderManagement;
use Illuminate\Support\Facades\Auth;

class OrderController extends WebController
{
    //搜索页面
    public function searchOrder() {
    	return view('mobile.order.search_order');
    }
    //搜索结果页面
    public function searchOrderResult() {
        $orderNumber = $this->request->get('ordernumber');
        $result = OrderManagement::getOrderByOrderNumber($orderNumber);
        if(($result['status'] == 'failed')) {
            $data = ['message'=>$result['message']];
            return view('mobile.order.search_order', $data);
        }
        $data = $result['data'];
    	return view('mobile.order.search_order_result', $data);
    }
}